package exercises.Charpter10;

interface Inner{
	void myfunc();
}

public class Twelve {
	private int a = 0;
	private void func(){
		System.out.println("Twelve func");
	}
	public Inner returnInner(){
		return new Inner() {
			public void myfunc(){
				a = 10;
				func();
			}
		};
	}
	
	public static void main(String[] args){
		Twelve test = new Twelve();
		Inner test1 = test.returnInner();
		test1.myfunc();
		System.out.println(test.a);
	}
}

